Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

where do these scripts go? and are they correct?

Asked by 1 year ago
Edited 1 year ago
local replicated = game:GetService("ReplicatedStorage")
local kickplayer = replicated:WaitForChild("KickPlayer")
local player = game.Players.localPlayer
local playergui = player.PlayerGui
local objective1 = player.playergui:WaitForChild("ShoppingList").Frame.ObjectiveOne
local objective2 = player.playergui:WaitForChild("ShoppingList").Frame.ObjectiveTwo
local objective3 = player.playergui:WaitForChild("ShoppingList").Frame.ObjectiveThree
local objective4 = player.playergui:WaitForChild("ShoppingList").Frame.ObjectiveFour
 if objective1.Text == "------" and objective2.Text == "------" and objective3.Text == "------" 
and objective4.Text == "------"then
kickplayer:FireServer(player, "you got all the items on the shopping list!")

end

other script:

local replicated = game:GetService("ReplicatedStorage")
local kickplayer = replicated:WaitForChild("KickPlayer")
kickplayer.OnServerEvent:Connect(function(player, message)
    if player then
        player:Kick(message)

end
end)

im not too sure where they go, and im not sure if they are correct, im trying to make it so when you click multiple items itll kick you out of the game, but it wont work. help? just saying im not very experienced with scripting, so just to clarify.

0
Please put your scripts in a code block. Edit this post and click the Lua code icon to create code block. theking66hayday 841 — 1y
0
alright hudstir 0 — 1y
0
there hudstir 0 — 1y
0
Put the local script in StarterGui and the server script in ServerScriptService. xInfinityBear 1777 — 1y
0
it didnt work hudstir 0 — 1y

Answer this question