of     1   

PleasantKillerman
#140106522Saturday, July 12, 2014 5:56 PM GMT

Hi. With the new update of Roblox, the Tween servive is not accessible in a global script. So, I need to move my script, in a LocalScript, but I don't know how to change it to a LocalScript. Can someones help me? P.S. Sorry if you don't understand my English. I hope you'll understand it. local identifier = "medallion1" local stat = "Medallions" local description = "You got the Medallion of Forest!" local respawn = true local debounce = false script.Parent.Touched:connect(function(part) if not debounce then debounce = true local player = game.Players:GetPlayerFromCharacter(part.Parent) if player then if player:findFirstChild("OneTimeItems") and player:findFirstChild("leaderstats") then if not player.OneTimeItems:findFirstChild(identifier) then local newidentifier = Instance.new("Accoutrement",player.OneTimeItems) newidentifier.Name = identifier local stats = player.leaderstats:findFirstChild(stat) if stats then stats.Value = stats.Value + 1 else print(stat.." not found in leaderstats") end local newgui = player.PlayerGui.ItemGet newgui.Frame.Description.Text = description Spawn(function() newgui.Frame:TweenPosition(UDim2.new(0.5, -150, 0.5, -60), "Out", "Elastic", 2) wait(13) newgui.Frame:TweenPosition(UDim2.new(0.5, -150, 0, -300), "Out", "Elastic", 2) wait(1) if player:findFirstChild("Checkpoint") then player.Checkpoint.Value = Vector3.new(5.6, 97, -3.4) end if respawn then if player:findFirstChild("Checkpoint") then player.Checkpoint.Value = Vector3.new(5.6, 97, -3.4) end player:LoadCharacter() else newgui:Destroy() end end) else local newgui = workspace.MainGameScript.ItemGet:clone() --"ItemGet" is suppose to be in my StarterGui newgui.Parent = player.PlayerGui newgui.Frame.Description.Text = "You already have this Medallion!" Spawn(function() newgui.Frame:TweenPosition(UDim2.new(0.5, -150, 0.5, -60), "Out", "Elastic", 2) wait(13.5) newgui.Frame:TweenPosition(UDim2.new(0.5, -150, 0, -300), "Out", "Elastic", 2) wait(1) if respawn then if player:findFirstChild("Checkpoint") then player.Checkpoint.Value = Vector3.new() end player:LoadCharacter() else newgui:Destroy() end end) end end end debounce = false end end)
Jetta765214
#140106929Saturday, July 12, 2014 6:02 PM GMT

Slight problem, Local scripts can only be located on the client. The first event in your script is script.Parent.Touched. Unless this is a tool, You're going to have to use 2 scripts(Unless you want each player to have a local script in them to detect that part, but that would get tedious). So the most likely solution would be have a local script cloned into the player on touch to do the stuff needed, then removed. Alt. of Jetta765214
PleasantKillerman
#140107095Saturday, July 12, 2014 6:03 PM GMT

Where do I put the clone script? In a globsl script or a LocalScript?
PleasantKillerman
#140109465Saturday, July 12, 2014 6:30 PM GMT

bump
PleasantKillerman
#140125855Saturday, July 12, 2014 9:14 PM GMT

bump2
PleasantKillerman
#140864212Saturday, July 19, 2014 6:48 PM GMT

bump3

    of     1