Click Giver works in Studio, but published version does not, how to fix?
Asked by
6 years ago Edited 6 years ago
So the basis of my game is a simple click, you get a prompt, and an item. In the studio version, it works perfectly fine, but in the published game, you only get the prompt (from another script). I don't know how to fix this. I've tried replacing it with other versions, but NOTHING will work. Any ideas?
01 | function onClicked(part) |
03 | local player = game.Players.LocalPlayer |
04 | local giver = game.Players:FindFirstChild( "" ..player.Name.. "" ) |
07 | local wep = game.Lighting.Key:clone() |
08 | wep.Parent = giver.Backpack |
12 | script.Parent.ClickDetector.MouseClick:connect(onClicked) |